//角色相关接口

import request from '@/utils/request' 

const api = {  
  del:'/cms/sysRole/delete', //逻辑删除角色表
  deleteBatch:'/cms/sysRole/deleteBatch', //逻辑批量删除角色表
  get:'/cms/sysRole/get', //根据id查找 
  queryAllList:'/cms/sysRole/queryAllList', //查询所有角色列表 
  queryMenuListByRoleId:'/cms/sysRole/queryMenuListByRoleId', //根据角色id获取菜单列表 
  queryModuleListByRoleId:'/cms/sysRole/queryModuleListByRoleId', //根据角色id获取模板列表 
  queryPageList:'/cms/sysRole/queryPageList', //角色表列表 
  queryTreeList:'/cms/sysRole/queryTreeList', //角色树列表 
  queryUserListByRoleId:'/cms/sysRole/queryUserListByRoleId', //根据角色id获取用户列表 
  remove:'/cms/sysRole/remove', //删除角色表 
  removeBatch:'/cms/sysRole/removeBatch', //批量删除角色表 
  save:'/cms/sysRole/save', //保存角色表 
  saveDataAuthority:'/cms/sysRole/saveDataAuthority', //分配数据权限 
  saveMenuAuthority:'/cms/sysRole/saveMenuAuthority', //分配菜单 
  saveModuleAuthority:'/cms/sysRole/saveModuleAuthority', //分配用户 
  saveUserAuthority:'/cms/sysRole/saveUserAuthority', //分配用户 
  updateOrderNum:'/cms/sysRole/updateOrderNum', //修改排序序号 


  queryList:'/cms/sysRole/queryList', //查询所有角色列表 不分页
}
   
export function del (parameter) {
  return request({
    url: api.del,
    method: 'post',
    data: parameter
  })
}
export function deleteBatch (parameter) {
  return request({
    url: api.deleteBatch,
    method: 'post',
    data: parameter
  })
}

export function get (parameter) {
  return request({
    url: api.get,
    method: 'post',
    data: parameter
  })
}

export function queryAllList (parameter) {
  return request({
    url: api.queryAllList,
    method: 'post',
    data: parameter
  })
}

export function queryMenuListByRoleId (parameter) {
  return request({
    url: api.queryMenuListByRoleId,
    method: 'post',
    data: parameter
  })
}

export function queryModuleListByRoleId (parameter) {
  return request({
    url: api.queryModuleListByRoleId,
    method: 'post',
    data: parameter
  })
}

export function queryPageList (parameter) {
  return request({
    url: api.queryPageList,
    method: 'post',
    data: parameter
  })
}

export function queryTreeList (parameter) {
  return request({
    url: api.queryTreeList,
    method: 'post',
    data: parameter
  })
}

export function queryUserListByRoleId (parameter) {
  return request({
    url: api.queryUserListByRoleId,
    method: 'post',
    data: parameter
  })
}

export function remove (parameter) {
  return request({
    url: api.remove,
    method: 'post',
    data: parameter
  })
}

export function removeBatch (parameter) {
  return request({
    url: api.removeBatch,
    method: 'post',
    data: parameter
  })
}

export function save (parameter) {
  return request({
    url: api.save,
    method: 'post',
    data: parameter
  })
}

export function saveDataAuthority (parameter) {
  return request({
    url: api.saveDataAuthority,
    method: 'post',
    data: parameter
  })
}

export function saveMenuAuthority (parameter) {
  return request({
    url: api.saveMenuAuthority,
    method: 'post',
    data: parameter
  })
}

export function saveModuleAuthority (parameter) {
  return request({
    url: api.saveModuleAuthority,
    method: 'post',
    data: parameter
  })
}

export function saveUserAuthority (parameter) {
  return request({
    url: api.saveUserAuthority,
    method: 'post',
    data: parameter
  })
}

export function updateOrderNum (parameter) {
  return request({
    url: api.updateOrderNum,
    method: 'post',
    data: parameter
  })
} 

export function queryList (parameter) {
  return request({
    url: api.queryList,
    method: 'post',
    data: parameter
  })
} 

